-----------------------------------------
-- ID: 5654
-- Item: Cherry Muffin
-- Food Effect: 1Hr, All Races
-----------------------------------------
-- Intelligence 2
-- MP % 10 (cap 85)
-- Agility -1
-----------------------------------------
require("scripts/globals/status");
-----------------------------------------

function onItemCheck(target)
    local result = 0;
    if (target:hasStatusEffect(dsp.effect.FOOD)) then
        result = 246;
    end
    return result;
end;

function onItemUse(target)
    target:addStatusEffect(dsp.effect.FOOD,0,0,3600,5654);
end;

-----------------------------------------
-- onEffectGain Action
-----------------------------------------

function onEffectGain(target,effect)
    target:addMod(dsp.mod.INT, 2);
    target:addMod(dsp.mod.FOOD_MPP, 10);
    target:addMod(dsp.mod.FOOD_MP_CAP, 85);
    target:addMod(dsp.mod.AGI, -1);
end;

function onEffectLose(target, effect)
    target:delMod(dsp.mod.INT, 2);
    target:delMod(dsp.mod.FOOD_MPP, 10);
    target:delMod(dsp.mod.FOOD_MP_CAP, 85);
    target:delMod(dsp.mod.AGI, -1);
end;
